<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <title>发布商品</title>
    <link href="/css/home_page/header_and_nav.css" rel="stylesheet"/>
    <link rel="icon" href="/img/page_icon.png"/>
    <link href="/css/product/publish_product.css" rel="stylesheet"/>
    <script src="/js/jquery-1.3.2.min.js"></script>
    <script src="/js/home/header_model_js.js"></script>
    <script src="/js/mall/type_list_obj.js"></script>
    <script src="/js/publish/publish_product.js"></script>
</head>
<body>
<header th:include="header :: copy"></header>
<div th:include="short_nav_show :: short_nav_show" class="short_nav_show"></div>
<nav th:include="my_nav :: my_nav" class="my_nav"></nav>
<div th:include="personal_nav :: personal_nav" class="personal_nav"></div>
<div style="display: none" th:if="${message}!=null" th:value="${message}" th:text="${message}" class="show_tip"></div>
<div class="top_content">
    <div class="publish_product_div">
        <form action="/insertGoods.do" method="post" enctype="multipart/form-data">
            <input type="hidden" th:value="${token}" name="token"/>
            <input type="hidden" th:value="${action}" value="1" name="action" class="action"/>
            <input type="hidden" th:if="${shopInformation.id}!=null" th:value="${shopInformation.id}" name="id"/>
            <input type="hidden" th:if="${shopInformation.id}==null" value="0" name="id"/>
            <div class="publish_one_par">
                <div class="publish_title">
                    <h3>商品名</h3>
                </div>
                <div class="publish_content">
                    <input type="text" class="title_input" name="name" required="required"
                           th:if="${shopInformation.name}==null"/>
                    <input type="text" class="title_input" name="name" required="required"
                           th:if="${shopInformation.name}!=null" th:value="${shopInformation.name}"
                    />
                </div>
            </div>
            <div class="publish_one_par">
                <div class="publish_title">
                    <h3>成色</h3>
                </div>
                <div class="publish_content">
                    <select class="choose_chengse" name="level">
                        <div style="display: none" th:if="${shopInformation.level}!=null"
                             th:switch="${shopInformation.level}">
                            <option th:case="'3'" value="3">三成</option>
                            <option th:case="'4'" value="4">四成</option>
                            <option th:case="'5'" value="5">五成</option>
                            <option th:case="'6'" value="6">六成</option>
                            <option th:case="'7'" value="7">七成</option>
                            <option th:case="'8'" value="8">八成</option>
                            <option th:case="'9'" value="9">九成</option>
                            <option th:case="'10'" value="10">全新</option>
                        </div>
                        <option value="3">三成</option>
                        <option value="4">四成</option>
                        <option value="5">五成</option>
                        <option value="6">六成</option>
                        <option value="7" selected="selected">七成</option>
                        <option value="8">八成</option>
                        <option value="9">九成</option>
                        <option value="10">全新</option>
                    </select>
                </div>
            </div>
            <div class="publish_one_par">
                <div class="publish_title">
                    <h3>单价</h3>
                </div>
                <div class="publish_content cost_content">
                    <input type="text" class="cost_input" name="price" required="required"
                           th:if="${shopInformation.price}==null"/>
                    <input type="text" class="cost_input" name="price" required="required"
                           th:if="${shopInformation.price}!=null" th:value="${shopInformation.price}"/>
                    <span>  RMB(.00)</span>
                </div>
            </div>
            <div class="publish_one_par">
                <div class="publish_title">
                    <h3>数量</h3>
                </div>
                <div class="publish_content">
                    <input type="text" class="count_input" name="quantity" required="required"
                           th:if="${shopInformation.quantity}==null"/>
                    <input type="text" class="count_input" name="quantity" required="required"
                           th:if="${shopInformation.quantity}!=null" th:value="${shopInformation.quantity}"/>
                </div>
            </div>
            <div class="publish_one_par">
                <div class="publish_title">
                    <h3>详情</h3>
                </div>
                <div class="publish_content">
                    <textarea class="detail_textarea" maxlength="122" placeholder="留下联系方式,方便买家联系" name="remark"
                              required="required" th:if="${shopInformation.remark}==null"></textarea>
                    <textarea class="detail_textarea" maxlength="122" placeholder="留下联系方式,方便买家联系" name="remark"
                              required="required"
                              th:if="${shopInformation.remark}!=null" th:value="${shopInformation.remark}"
                              th:text="${shopInformation.remark}"></textarea>
                </div>
            </div>
            <div class="publish_one_par">
                <div class="publish_title">
                    <h3>分类</h3>
                </div>
                <div class="publish_content">
                    <select class="choose_first_type">
                        <option id="type_1" selected="selected">数码科技</option>
                        <option id="type_2">影音家电</option>
                        <option id="type_3">鞋服配饰</option>
                        <option id="type_4">运动代步</option>
                        <option id="type_5">书籍文具</option>
                        <option id="type_6">其他</option>
                    </select><span class="to_left">--</span>
                    <select class="choose_second_type">
                        <option>三成</option>
                        <option>四成</option>
                        <option>五成</option>
                        <option>六成</option>
                        <option>七成</option>
                        <option>八成</option>
                        <option>九成</option>
                        <option>全新</option>
                    </select><span class="to_left">--</span>
                    <select class="choose_third_type" name="sort">
                        <option>三成</option>
                        <option>四成</option>
                        <option>五成</option>
                        <option>六成</option>
                        <option>七成</option>
                        <option>八成</option>
                        <option>九成</option>
                        <option>全新</option>
                    </select>
                    <br/>
                    <!--<span th:text="${sort}" th:value="${sort}"></span>-->
                </div>
            </div>
            <div class="publish_one_par">
                <div class="publish_title">
                    <h3>图片</h3>
                </div>
                <div class="img_content">
                    <input class="upload_img_input" type="file" name="image" required="required"/>
                </div>
                <img src="" class="show_choose_img" id="show_choose_img"/>
                <img src="" class="show_choose_img" th:if="${shopInformation.image}!=null"
                     th:src="${shopInformation.image}"/>
            </div>
            <div class="submit_content_div">
                <input type="submit" value="提交" class="submit_input"/>
            </div>
        </form>
    </div>
    <footer>
        <p>Copyright © 2017.Company name All rights reserved.<a href="/"></a></p>
    </footer>
</div>
</body>
</html>